package com.cloudkinto.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.cloudkinto.enumType.order.outbound.OutboundOrderKind;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 出库单拣货
 * </p>
 *
 * @author long
 * @since 2024-11-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_outbound_picking")
public class OutboundPickingDo extends Model<OutboundPickingDo> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 订单类型 {@link OutboundOrderKind}
     */
    @TableField("order_type")
    private String orderType;

    /**
     * 出库单产品子表id
     */
    @TableField("outbound_product_id")
    private Long outboundProductId;

    /**
     * 库存子表id
     */
    @TableField("sub_stock_id")
    private Long subStockId;

    /**
     * 库位id
     */
    @TableField("rack_id")
    private Long rackId;

    /**
     * 数量
     */
    @TableField("qty")
    private Integer qty;

    @TableField("pick_flag")
    private Boolean pickFlag;

    private Date createTime;

    private Date updateTime;

    @TableLogic
    private Integer deleteFlag;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
